/**
 * 功能描述：全球业绩接口
 */

import { baseUrl, Get, Post } from '../../server'

const severName = 'bigdata/api' // 服务前缀名
const newBaseUrl = baseUrl + severName

/**
 * 功能描述： 获取接口版本号
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/32907
 */
const homeGetAll: any = () => {
  const url = `${newBaseUrl}/basic/interfaceversioninfo`
  return Get(url)
}

/**
 * 功能描述： 获取会员年龄信息
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/32699
 */
const homeAgePie: any = () => {
  const url = `${newBaseUrl}/distributor/distributorageinfo`
  return Get(url)
}

/**
 * 功能描述： 获取会员性别信息
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/32707
 */
const homeSexPie: any = () => {
  const url = `${newBaseUrl}/distributor/distributorsexinfo`
  return Get(url)
}

/**
 * 功能描述： 获取新老会员业绩信息
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/32779
 */
const homeNewOldPie: any = () => {
  const url = `${newBaseUrl}/achievement/distributorperformanceproportioninfo`
  return Get(url)
}

/**
 * 功能描述： 获取新老会员业绩信息
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/32987
 */
const homeRetailPie: any = () => {
  const url = `${newBaseUrl}/achievement/retailexpandperformanceproportioninfo`
  return Get(url)
}

/**
 * 功能描述： 业绩占比信息
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/32979
 */
const homeAreaPie: any = () => {
  const url = `${newBaseUrl}/achievement/performanceproportioninfo`
  return Get(url)
}

/**
 * 功能描述： 获取会员统计信息
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/32979
 */
const homeFlexLeft: any = () => {
  const url = `${newBaseUrl}/distributor/distributorstatisticinfo`
  return Get(url)
}

/**
 * 功能描述： 各区有效会员
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/32711
 */
const homeGlobalValidMembers: any = () => {
  const url = `${newBaseUrl}/distributor/validdistributorinfo`
  return Get(url)
}

/**
 * 功能描述： 获取会员级别信息
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/32719
 */
const homeGlobalMemberLevelCounts: any = () => {
  const url = `${newBaseUrl}/distributor/distributorxjinfo`
  return Get(url)
}
/**
 * 功能描述： 全球各区核心经销商
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/33095
 */
const homeGlobalCoreDealers: any = () => {
  const url = `${newBaseUrl}/distributor/distributorcoreinfo`
  return Get(url)
}

/**
 * 功能描述： 业绩环比
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/32579
 */
const homeGlobalPerformanceRatio: any = () => {
  const url = `${newBaseUrl}/achievement/achievementmom`
  return Get(url)
}

/**
 * 功能描述： 业绩同比
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/32567
 */
const homeGlobalPerformanceYoY: any = () => {
  const url = `${newBaseUrl}/achievement/achievementyoy`
  return Get(url)
}

/**
 * 功能描述： 国家同比业绩信息
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/32583
 */
const homeCountryPerformanceYoY: any = () => {
  const url = `${newBaseUrl}/achievement/countryachievementyoy`
  return Get(url)
}

/**
 * 功能描述： 国家环比业绩信息
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/32587
 */
const homeNationalPerformanceMoM: any = () => {
  const url = `${newBaseUrl}/achievement/countryachievementmom`
  return Get(url)
}

/**
 * 功能描述： 业绩金额
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/32963
 */
const homeFlexRight: any = () => {
  const url = `${newBaseUrl}/achievement/performanceinfo`
  return Get(url)
}

/**
 * 功能描述： 获取核心会员明细
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/33119
 */
const homeTableCoreDealers: any = () => {
  const url = `${newBaseUrl}/distributor/distributorcoredetail`
  return Get(url)
}

/**
 * 功能描述： 全球及区域业绩目标达成信息
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/32591
 */
const globalCompletedReq: any = () => {
  const url = `${newBaseUrl}/achievement/areacompletedinfo`
  return Get(url)
}

/**
 * 功能描述： 国家业绩目标达成信息
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/32595
 */
const countryCompletedReq: any = () => {
  const url = `${newBaseUrl}/achievement/countrycompletedinfo`
  return Get(url)
}

/**
 * 功能描述： 新增会员趋势信息
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/32715
 */
const globalNewMemberReq: any = () => {
  const url = `${newBaseUrl}/distributor/newdistributorinfo`
  return Get(url)
}

/**
 * 功能描述： 业绩趋势信息
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/33019
 */
const globalPerformanceReq: any = () => {
  const url = `${newBaseUrl}/achievement/achievementtrendinfo`
  return Get(url)
}
/**
 * 功能描述： 获取今日成交信息
 * yapi地址：http://yapi.tiens.com/project/550/interface/api/33011
 */
const homeTodayMoney: any = () => {
  const url = `${newBaseUrl}/achievement/transactionperformanceinfo`
  return Get(url)
}


export const homeApi: any = {
  homeGetAll,
  homeAgePie,
  homeSexPie,
  homeNewOldPie,
  homeRetailPie,
  homeAreaPie,
  homeFlexLeft,
  homeGlobalValidMembers,
  globalCompletedReq,
  countryCompletedReq,
  globalNewMemberReq,
  globalPerformanceReq,
  homeTodayMoney,
  homeGlobalPerformanceYoY,
  homeGlobalPerformanceRatio,
  homeFlexRight,
  homeGlobalMemberLevelCounts,
  homeCountryPerformanceYoY,
  homeNationalPerformanceMoM,
  homeGlobalCoreDealers,
  homeTableCoreDealers
}
